$ sudo parted
$ print
$ select /dev/<device_name>
$ mkpart <partition_type> <file_system> <start_byte> <end_byte>
$ rm <partition_number>